"""shop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,re_path
from .views import index_views,user_views,cate_views,goods_views
urlpatterns = [
    #首页
    re_path(r'^$',index_views.index,name='myadmin_index'),
    re_path(r'^login/$',index_views.myadminlogin,name='myadmin_login'),
    re_path(r'^verifycode/$', index_views.verifycode, name='myadmin_yzm'),
    # 退出登录
    re_path(r'^outlogin/$', index_views.outlogin, name='myadmin_out'),


    #用户
    re_path(r'^vipuser/$',user_views.vipuser,name='myadmin_vipuser'),
    re_path(r'^adduser/$',user_views.adduser,name='myadmin_adduser'),
    re_path(r'^deluser/$', user_views.deluser,name='myadmin_deluser'),
    re_path(r'^edituser/$', user_views.edituser,name='myadmin_edituser'),
    # 重置密码
    re_path(r'^respwd/$', user_views.respwd,name='myadmin_respwd'),
    # 修改状态
    re_path(r'^changes/$', user_views.changes,name='myadmin_changes'),



    #商品分类
    re_path(r'^addcate/$',cate_views.addcate,name='myadmin_addcate'),
    re_path(r'^catelist/$',cate_views.catelist,name='myadmin_catelist'),
    re_path(r'^delcate/$', cate_views.delcate,name='myadmin_delcate'),
    re_path(r'^editcate/$', cate_views.editcate,name='myadmin_editcate'),

    # 商品管理
    re_path(r'^addgoods/$', goods_views.addgoods, name='myadmin_addgoods'),
    re_path(r'^goodsinsert/$', goods_views.goodsinsert, name='myadmin_goodsinsert'),
    re_path(r'^goodslist/$', goods_views.goodslist, name='myadmin_goodslist'),

]
